import { S } from '../../s';
import { IPSDEChartCoordinateSystem } from './ipsdechart-coordinate-system';
import { IPSSysPFPlugin } from '../../res/ipssys-pfplugin';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEChartCoordinateSystemImplBase
  extends PSModelObjectImpl
  implements IPSDEChartCoordinateSystem
{
  get eChartsType(): string {
    return this.M.eChartsType;
  }

  get index(): number {
    return this.M.index;
  }

  protected pssyspfplugin: IPSSysPFPlugin;
  getPSSysPFPlugin(): IPSSysPFPlugin | null {
    return (
      this.pssyspfplugin ||
      (this.pssyspfplugin = this.fillObjectModel(
        S._27c,
        this.M.getPSSysPFPlugin,
        S._2a7,
      ) as IPSSysPFPlugin)
    );
  }

  get type():
    | 'XY'
    | 'POLAR'
    | 'RADAR'
    | 'PARALLEL'
    | 'SINGLE'
    | 'CALENDAR'
    | 'MAP'
    | 'NONE' {
    return this.M.type;
  }
  get cls(): string {
    return 'PSDEChartCoordinateSystemImplBase';
  }
  instanceof(cls: string): boolean {
    if (cls == S._e4 || cls == S._e5) return true;
    return super.instanceof(cls);
  }
}
